#include <bits/stdc++.h>
using namespace std;
#define int long long 

void solve() {
    int n, k;
    cin >> n >> k;
    
    vector<int> a(n);
    for(int i = 0; i <n; i++) cin >>a[i];
    for(auto x : a) {
        if(x == k) {
            cout << "YES\n";
            return;
        }
    }
    cout << "NO\n";
}

signed main() {
    int t;
    cin >> t; while(t--) solve();
    return 0;
}